#pragma once

#include <AVUITKeyFrame.h>
#include <AVUIKeyTime.h>
#include <AVUIPoint.h>
#include <AVUIColor.h>
#include <AVUIPoint3D.h>
#include <AVUIVector3D.h>
#include <AVUIRotation3D.h>

namespace AVUI {

class SingleKeyFrame : public TValueKeyFrame<float>
{
public:
    DECLARE_ELEMENT(SingleKeyFrame, Animatable);

    DECLARE_DEPENDENCY_PROPERTY(Value);
    float get_Value() { return AVUI::UnboxValue<float>(GetValue(get_ValueProperty())); }
    void set_Value(float value) { SetValue(get_ValueProperty(), AVUI::BoxValue(value)); } 

    DECLARE_DEPENDENCY_PROPERTY(KeyTime);
    KeyTime get_KeyTime() { return AVUI::UnboxValue<KeyTime>(GetValue(get_KeyTimeProperty())); }
    void set_KeyTime(const KeyTime& value) { SetValue(get_KeyTimeProperty(), AVUI::BoxValue(value)); } 

private:

    static void StaticConstructor();
};

class DoubleKeyFrame : public TValueKeyFrame<float>
{
public:
    DECLARE_ELEMENT(DoubleKeyFrame, Animatable);

    DECLARE_DEPENDENCY_PROPERTY(Value);
    float get_Value() { return AVUI::UnboxValue<float>(GetValue(get_ValueProperty())); }
    void set_Value(float value) { SetValue(get_ValueProperty(), AVUI::BoxValue(value)); } 

    DECLARE_DEPENDENCY_PROPERTY(KeyTime);
    KeyTime get_KeyTime() { return AVUI::UnboxValue<KeyTime>(GetValue(get_KeyTimeProperty())); }
    void set_KeyTime(const KeyTime& value) { SetValue(get_KeyTimeProperty(), AVUI::BoxValue(value)); } 

private:

    static void StaticConstructor();
};

class PointKeyFrame : public TValueKeyFrame<Point>
{
public:
    DECLARE_ELEMENT(PointKeyFrame, Animatable);

    DECLARE_DEPENDENCY_PROPERTY(Value);
    Point get_Value() { return AVUI::UnboxValue<Point>(GetValue(get_ValueProperty())); }
    void set_Value(const Point& value) { SetValue(get_ValueProperty(), AVUI::BoxValue(value)); } 

    DECLARE_DEPENDENCY_PROPERTY(KeyTime);
    KeyTime get_KeyTime() { return AVUI::UnboxValue<KeyTime>(GetValue(get_KeyTimeProperty())); }
    void set_KeyTime(const KeyTime& value) { SetValue(get_KeyTimeProperty(), AVUI::BoxValue(value)); } 

private:

    static void StaticConstructor();
};


class ColorKeyFrame : public TValueKeyFrame<Color>
{
public:
    DECLARE_ELEMENT(ColorKeyFrame, Animatable);

    DECLARE_DEPENDENCY_PROPERTY(Value);
    Color get_Value() { return AVUI::UnboxValue<Color>(GetValue(get_ValueProperty())); }
    void set_Value(const Color& value) { SetValue(get_ValueProperty(), AVUI::BoxValue(value)); } 

    DECLARE_DEPENDENCY_PROPERTY(KeyTime);
    KeyTime get_KeyTime() { return AVUI::UnboxValue<KeyTime>(GetValue(get_KeyTimeProperty())); }
    void set_KeyTime(const KeyTime& value) { SetValue(get_KeyTimeProperty(), AVUI::BoxValue(value)); } 

private:

    static void StaticConstructor();
};

class Vector3DKeyFrame : public TValueKeyFrame<Vector3D>
{
public:
    DECLARE_ELEMENT(Vector3DKeyFrame, Animatable);

    DECLARE_DEPENDENCY_PROPERTY(Value);
    Vector3D get_Value() { return AVUI::UnboxValue<Vector3D>(GetValue(get_ValueProperty())); }
    void set_Value(const Vector3D& value) { SetValue(get_ValueProperty(), AVUI::BoxValue(value)); } 

    DECLARE_DEPENDENCY_PROPERTY(KeyTime);
    KeyTime get_KeyTime() { return AVUI::UnboxValue<KeyTime>(GetValue(get_KeyTimeProperty())); }
    void set_KeyTime(const KeyTime& value) { SetValue(get_KeyTimeProperty(), AVUI::BoxValue(value)); } 

private:

    static void StaticConstructor();
};

class Point3DKeyFrame : public TValueKeyFrame<Point3D>
{
public:
    DECLARE_ELEMENT(Point3DKeyFrame, Animatable);

    DECLARE_DEPENDENCY_PROPERTY(Value);
    Point3D get_Value() { return AVUI::UnboxValue<Point3D>(GetValue(get_ValueProperty())); }
    void set_Value(const Point3D& value) { SetValue(get_ValueProperty(), AVUI::BoxValue(value)); } 

    DECLARE_DEPENDENCY_PROPERTY(KeyTime);
    KeyTime get_KeyTime() { return AVUI::UnboxValue<KeyTime>(GetValue(get_KeyTimeProperty())); }
    void set_KeyTime(const KeyTime& value) { SetValue(get_KeyTimeProperty(), AVUI::BoxValue(value)); } 

private:

    static void StaticConstructor();
};

class Rotation3DKeyFrame : public TReferenceKeyFrame<Rotation3D>
{
public:
    DECLARE_ELEMENT(Rotation3DKeyFrame, Animatable);

    DECLARE_DEPENDENCY_PROPERTY(Value);
    TRefCountedPtr<Rotation3D> get_Value() { return (Rotation3D*)(Object*)GetValue(get_ValueProperty()); }
    void set_Value(Rotation3D* pValue) { SetValue(get_ValueProperty(), (Object*)pValue); } 

    DECLARE_DEPENDENCY_PROPERTY(KeyTime);
    KeyTime get_KeyTime() { return AVUI::UnboxValue<KeyTime>(GetValue(get_KeyTimeProperty())); }
    void set_KeyTime(const KeyTime& value) { SetValue(get_KeyTimeProperty(), AVUI::BoxValue(value)); } 

private:

    static void StaticConstructor();
};



}; // namespace AVUI
